package org.feng.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.feng.api.ResultVo;
import org.feng.api.sys.logs.LogVO;
import org.feng.service.IOperateLogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 日志Api接口控制器
 *
 * @author feng
 */
@RequestMapping("/api/log")
@RestController
@Api(tags = "日志Api接口控制器")
public class OperateLogController {

    @Resource
    private IOperateLogService operateLogService;

    @GetMapping("/listByQueryId/{queryId}")
    @ApiOperation("依据queryId查询")
    public ResultVo<List<LogVO>> listByQueryId(@PathVariable("queryId") String queryId) {
        return new ResultVo<>(0, null, operateLogService.queryByQueryId(queryId));
    }
}
